package com.ali.memory;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;

public class TestOOM {

	public static void main(String[] args) throws Exception {
		List<ByteBuffer> a = new ArrayList();
		try {
			for (int i = 0; i < 10000; i++) {
				ByteBuffer bb1 = ByteBuffer.allocate(1024 * 256);
				a.add(bb1);
				Thread.sleep(200);
			}
		} catch (Error e) {
			e.printStackTrace();
		}
		System.out.println("come on");
	}
}
